package com.patni.body;


import java.awt.Color;
import java.util.ArrayList;
import java.util.List;

import javax.swing.JLabel;
import javax.swing.JPanel;

import com.patni.body.detail.Detail1Pan;
import com.patni.body.detail.ModuleList;
import com.patni.detail1.bean.Detail1Bean;
import com.patni.detail1.bean.ModuleListBean;
import com.patni.detail1.bean.ModuleBean;

public class BodyListDetail {
	public static JPanel[] bodyListDetail;
	public final static int width=500;
	

	public BodyListDetail(){
		bodyListDetail=new JPanel[4];
		for(int i=0;i<4;i++){
			bodyListDetail[i]=new JPanel();
		}
//		bodyListDetail[0].setText("聊天好友界面");
//		bodyListDetail[1].setText("群与讨论组");
//		bodyListDetail[2].setText("其他");
//		bodyListDetail[3].setText("最近联系人");
		JLabel j1=new JLabel("聊天好友界面"+"\n" +
				"f"+"聊天好友界面"+"\n"+"聊天好友界面");
		JLabel j2=new JLabel("群与讨论组");
		JLabel j3=new JLabel("其他");
		JLabel j4=new JLabel("最近联系人");
//		j1.setLabelFor(bodyListDetail[0]);
//		j2.setLabelFor(bodyListDetail[1]);
//		j3.setLabelFor(bodyListDetail[2]);
//		j4.setLabelFor(bodyListDetail[3]);
		
		bodyListDetail[0].setBackground(Color.red);
		bodyListDetail[1].setBackground(Color.orange);
		bodyListDetail[2].setBackground(Color.gray);
		bodyListDetail[3].setBackground(Color.pink);
		
		bodyListDetail[0].add(j1);
		bodyListDetail[0].add(j2);
		
		bodyListDetail[0].add(j3);
		bodyListDetail[0].add(j4);
		

		bodyListDetail[1].add(j2);
		bodyListDetail[2].add(j3);
		bodyListDetail[3].add(j4);
		
		
		List<ModuleBean> list=new ArrayList<ModuleBean>();
		List<ModuleBean> list1=new ArrayList<ModuleBean>();
		
		list.add(new ModuleBean("1.jpg","张三","阿达达阿达阿法打法阿达发"));
		list.add(new ModuleBean("2.jpg","张三1","阿达2222222222222"));
		list.add(new ModuleBean("3.jpg","张三2","111111111111111111aaaaaaaaaaasdddddddddddddda11"));
		list.add(new ModuleBean("28-1.png","Sky","Don't worry,Be happy!"));
		list.add(new ModuleBean("4.jpg","张三3","11111111111111111111"));
		list.add(new ModuleBean("5.jpg","张三4","11111111111111111111"));
		list.add(new ModuleBean("6.jpg","张三5","11111111111111111111"));
		
		list.add(new ModuleBean("7.jpg","张三6","11111111111111111111"));
		list.add(new ModuleBean("8.jpg","张三7","11111111111111111111"));
		list.add(new ModuleBean("9.jpg","张三8","11111111111111111111"));
		
		list.add(new ModuleBean("5-1.png","张三9","11111111111111111111"));
		list.add(new ModuleBean("14-1.png","张三520","11111111111111111111"));
		
		list1.add(new ModuleBean("1-1.png","张三52","11111111111111111111"));
		list1.add(new ModuleBean("12-1.png","张三32","11111111111111111111"));
		list1.add(new ModuleBean("13-1.png","张三24","11111111111111111111"));
		
		list1.add(new ModuleBean("15-1.png","张三ppppppp","11111111111111111111"));
		
		ModuleListBean listBean=new ModuleListBean(0,"我的好友",list,false);
		ModuleListBean listBean1=new ModuleListBean(1,"我的好友2222",list1,true);
		
//		List<ModuleListBean> b =new ArrayList<ModuleListBean>();

		Detail1Bean b1=new Detail1Bean();
		b1.add(listBean);
		b1.add(listBean1);
		b1.add(listBean1);
//		bodyListDetail[0]=new Bean1List(b1).getDetail1();
//		bodyListDetail[0]=new ModuleList(listBean).getModuleListPan();
		bodyListDetail[0]=new Detail1Pan(b1).getDetail1Pan();
		bodyListDetail[0].setLocation(0, 0);
		bodyListDetail[1].setBounds(width, 0, width, 600);
		bodyListDetail[2].setBounds(width*2, 0, width, 1800);
		bodyListDetail[3].setBounds(width*3, 0, width, 200);
		
	}
}
